﻿using System;

namespace Ganss.Excel.Tests.Data
{
    class NullableProduct
    {
        public string Name { get; set; }
        public int? Number { get; set; }
        public decimal? Price { get; set; }
        public bool? Offer { get; set; }
        public DateTime? OfferEnd { get; set; }

        public override bool Equals(object obj)
        {
            if (obj is not NullableProduct o) return false;
            return o.Name == Name && o.Number == Number && o.Price == Price && o.Offer == Offer && o.OfferEnd == OfferEnd;
        }

        public override int GetHashCode()
        {
            return (Name + Number + Price + Offer + OfferEnd).GetHashCode();
        }
    }
}